<?php $form=$this->beginWidget('bootstrap.widgets.TbActiveForm',array(
	'id'=>'unit-project-form',
	'enableAjaxValidation'=>false,
)); ?>

	<?php echo $form->errorSummary($model); ?>

	<?php echo $form->textFieldRow($model,'name',array('class'=>'span5','maxlength'=>48)); ?>

	<?php echo $form->textAreaRow($model,'description',array('class'=>'span5','maxlength'=>255)); ?>

	<?php 
	echo $form->labelEx($model,'pre_start_at');
	$this->widget('zii.widgets.jui.CJuiDatePicker',array(
			'name'=>'UnitProject[pre_start_at]',
			'language' => 'zh-CN',
			'value' => substr($model->pre_start_at, 0, 10),
			// additional javascript options for the date picker plugin
			'options'=>array(
					'changeMonth' => 'true',
					'changeYear' => 'true',
					'showButtonPanel' => 'true',
			),
			'htmlOptions'=>array(
					'class'=>'span2'
			),
	));
	?>
	
	<?php 
	echo $form->labelEx($model,'pre_end_at');
	$this->widget('zii.widgets.jui.CJuiDatePicker',array(
			'name'=>'UnitProject[pre_end_at]',
			'language' => 'zh-CN',
			'value' => substr($model->pre_end_at, 0, 10),
			// additional javascript options for the date picker plugin
			'options'=>array(
					'changeMonth' => 'true',
					'changeYear' => 'true',
					'showButtonPanel' => 'true',
					//	'showAnim'=>'fold',
			),
			'htmlOptions'=>array(
					'class'=>'span2'
			),
	));
	?>
	
	<?php 
	echo $form->labelEx($model,'real_start_at');
	$this->widget('zii.widgets.jui.CJuiDatePicker',array(
			'name'=>'UnitProject[real_start_at]',
			'language' => 'zh-CN',
			'value' => substr($model->real_start_at, 0, 10),
			// additional javascript options for the date picker plugin
			'options'=>array(
					'changeMonth' => 'true',
					'changeYear' => 'true',
					'showButtonPanel' => 'true',
					//	'showAnim'=>'fold',
			),
			'htmlOptions'=>array(
					'class'=>'span2'
			),
	));
	?>
	
	<?php 
	echo $form->labelEx($model,'real_end_at');
	$this->widget('zii.widgets.jui.CJuiDatePicker',array(
			'name'=>'UnitProject[real_end_at]',
			'language' => 'zh-CN',
			'value' => substr($model->real_end_at, 0, 10),
			// additional javascript options for the date picker plugin
			'options'=>array(
					'changeMonth' => 'true',
					'changeYear' => 'true',
					'showButtonPanel' => 'true',
					//	'showAnim'=>'fold',
			),
			'htmlOptions'=>array(
					'class'=>'span2'
			),
	));
	?>

	<div class="form-actions">
		<?php $this->widget('bootstrap.widgets.TbButton', array(
			'buttonType'=>'submit',
			'type'=>'primary',
			'label'=>$model->isNewRecord ? Yii::t('common','Create') : Yii::t('common','Save'),
		)); ?>
	</div>

<?php $this->endWidget(); ?>


